<?php

class Tool_Cache
{
    static $instanceCache = array();

    public static function getInstance($className)
    {
        if (!isset(self::$instanceCache[$className]))
        {
            self::$instanceCache[$className] = new $className;
        }
        return self::$instanceCache[$className];
    }
}
?>